﻿using System;
using System.Windows.Forms;

namespace WindowsApplication2._911_系统.剪切板
{
    public partial class Form_jianqie : Form
    {
        public Form_jianqie()
        {
            InitializeComponent();
        }

        private void Form_jianqie_Load(object sender, EventArgs e)
        {
            CopySelectedTextToClipboard();
        }

        public void CopySelectedTextToClipboard()
        {
            Clipboard.SetDataObject("1111", false);
        }

        public void PasteTextFromClipboard()
        {
            string value = (string)Clipboard.GetDataObject().GetData("Text");
            this.richTextBox1.Text = value;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            PasteTextFromClipboard();
        }
    }
}